package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.OrganizationDepartmentPrincipal;
import com.xmy.cultivate.mapper.OrganizationDepartmentPrincipalMapper;
import com.xmy.cultivate.service.IOrganizationDepartmentPrincipalService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 部门负责人详情 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2025-05-27
 */
@Service
public class OrganizationDepartmentPrincipalServiceImpl extends ServiceImpl<OrganizationDepartmentPrincipalMapper, OrganizationDepartmentPrincipal> implements IOrganizationDepartmentPrincipalService {

    @Autowired
    OrganizationDepartmentPrincipalMapper organizationDepartmentPrincipalMapper;
    @Override
    public OrganizationDepartmentPrincipal getByDepartmentId(String departmentId, Long dutyId, Long staffId, Integer yearPart, Integer quarterNum) {
        return organizationDepartmentPrincipalMapper.getByDepartmentId(departmentId, dutyId, staffId, yearPart, quarterNum);
    }

    /**
     * 获取年级负责人，负责的年级
     * @param yearPart
     * @param quarterNum
     * @param teacherId
     * @param dutyType
     * @return
     */
    @Override
    public String getYearClassIdsForTeacherId(@Param("yearPart") Integer yearPart, @Param("quarterNum") Integer quarterNum, @Param("teacherId") Long teacherId, @Param("dutyType") Integer dutyType){
        return organizationDepartmentPrincipalMapper.getYearClassIdsForTeacherId(yearPart,quarterNum,teacherId,dutyType);
    }
}
